﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var purtypeData = Jxstar.findComboData('purtype');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var applystatusData = Jxstar.findComboData('applystatus');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'采购单名称', name:'pur_apply__apply_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'项目编号', name:'pur_apply__project_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'项目名称', name:'pur_apply__project_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'预算金额(万元)', name:'pur_apply__project_money', readOnly:true, anchor:'100%', maxLength:12},
					{xtype:'textfield', fieldLabel:'实施单位', name:'pur_apply__dept_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'combo', fieldLabel:'采购方式', name:'pur_apply__pur_type', defaultval:'jz',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: purtypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: purtypeData[0][0]},
					{xtype:'textfield', fieldLabel:'申请人', name:'pur_apply__apply_user', defaultval:'fun_getUserName()', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'选中供应商', name:'pur_apply__provider_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'中标金额(万元)', name:'pur_apply__bid_money', readOnly:true, anchor:'100%', maxLength:12},
					{xtype:'hidden', fieldLabel:'主键', name:'pur_apply__apply_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'申请人ID', name:'pur_apply__apply_userid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'选中供应商ID', name:'pur_apply__provider_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'采购单方案申请ID', name:'pur_apply__check_id', anchor:'100%'}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'采购单号', name:'pur_apply__apply_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'combo', fieldLabel:'项目类别', name:'pur_apply__money_type',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: moneytypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: moneytypeData[0][0]},
					{xtype:'textfield', fieldLabel:'项目批复文号', name:'pur_apply__check_fileno', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'项目批复名称', name:'pur_apply__check_name', readOnly:true, anchor:'100%', maxLength:150},
					{xtype:'textfield', fieldLabel:'项目负责人', name:'pur_apply__project_user', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'主管部门', name:'pur_apply__done_deptname', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'combo', fieldLabel:'采购状态', name:'pur_apply__apply_status', defaultval:'1',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: applystatusData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: applystatusData[0][0]},
					{xtype:'datefield', fieldLabel:'申请日期', name:'pur_apply__apply_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%', readOnly:true},
					{xtype:'datefield', fieldLabel:'中标日期', name:'pur_apply__bid_date', format:'Y-m-d', anchor:'100%', readOnly:true},
					{xtype:'hidden', fieldLabel:'项目负责人ID', name:'pur_apply__project_userid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主管部门ID', name:'pur_apply__done_deptid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'实施单位ID', name:'pur_apply__dept_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目ID', name:'pur_apply__project_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'授权形式', name:'pur_apply__auth_type', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'项目主要内容', name:'pur_apply__project_content', readOnly:true, width:'100%', height:72, maxLength:2000}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'pur_say_apply'
	};

	
	
	return new Jxstar.FormNode(config);
}